<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <title></title>
    <link rel="stylesheet" type="text/css" href="styles/drugcms.css" />
	<meta http-equiv="expires" content="0">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="pragma" content="no-cache">
	<style type="text/css">
	  .system_clear {
		border: 1px solid #B3B3B3; 
		width: 570px;
		margin-top: 10px;
		
	  }
	  
	  .system_clear_header {
		background-color: #E2E2E2;
		height: 11px;
		color: #666;
		padding: 2px 5px 5px 5px;
	  }
	  
	  .system_clear_form_row {
		padding: 2px;
		padding-left: 5px;
		clear: left;
		width: 300px;
	  }
	  
	  #select_list_clients select{
		width: 150px;
		margin-top: 5px;
		border: 1;
	  }
	  
	  .system_clear_form_row .label {
		width: 180px;
		display: block;
		float:left
	  }
	  
	  .system_clear_form_row .label_middle {
		float:left;
		padding-right: 5px; 
		padding-top: 2px;
	  }
	  .system_clear_form_row .labelrightCol {
		display: block;
		padding-left: 10px;
		padding-top: 2px;
		
	  }

	  .system_clear_form_row .input {
		display: block;
		float:left;
		vertical-align: middle;
	  }
	  
	  .system_clear_group {
		border-top: 1px solid #B3B3B3;
	  }
	  
	  .system_clear_group .leftCol{
		float:left;
		width: 150px;
		padding: 5px;
	  }
	  
	  .system_clear_group .rightCol{
		float:left;
		border-left: 1px solid #B3B3B3;
		padding-bottom: 5px;
		white-space: nowrap;
	  }
	  
	  .system_clear_group .bottom{
		text-align: right;
		padding: 5px;
	  }
	  
	  .system_clear_group .clear_float {
		clear:both; 
		display: none;
		
	  }
	  
	  #select_list_clients {
		margin-left: 20px;
		width: 150px;
	  }
	  
	 .clearfix:after{
		content:".";
		display:block;
		clear: both;
		height:0px;
		visibility:hidden;
		line-height: 0;
	  }
	  
	  .clearfix {
		display:block;
	  }
	  
	  #system_clear_error_box {
	  	display: none;
	  }
	  
	  #contenido_notification {
	  	padding-top: 5px;
	  }
	  
	  *+html .clearfix:after, * html .clearfix:after{
		height: 1px;
	  }

	  *+html .clearfix, * html .clearfix {
		height: 1%;
		display: inline-block;
	  }
	  
	</style>
	<script type="text/javascript" src="scripts/jquery/jquery.js"></script>
	<script type="text/javascript" src="scripts/infoBox.js"></script>
	<script type="text/javascript" src="scripts/general.js"></script>
	<script type="text/javascript" src="scripts/messageBox.js.php?contenido={CONTENIDO}"></script>
	<script type="text/javascript">
		var box = new messageBox("", "", "", 0, 0);

		$(document).ready(function() {
			$('#available_clients').click(function () {
			  if ($('#select_list_clients').css('display') != 'block') {
				$('#select_list_clients').fadeIn('middle');
			  }	
			}) 

			$('#select_all_clients').click(function () {
				if ($('#select_list_clients').css('display') != 'none') {
					$('#select_list_clients').fadeOut('middle');
				}
			})	
			
			$('input[name="clientHistory"]').change(function () {
				if ($(this).attr('checked')) 
					$('input[name="keepHistory"]').attr('checked', true);
				else
					$('input[name="keepHistory"]').attr('checked', false);	
			});
			
			$('#imgFormSubmit').click(function() {
				
				var iSelClient = $('input[name="selectClient"]:checked', '#frmSystemPurge').val()
				var bSelClient = false;
				var iActionSel = $('input[type="checkbox"]:checked').length
				var sErrMsg = '';
				var bErr = false;
				
				if ($.trim($('#system_clear_info_box').html()) != '') 
					$('#system_clear_info_box').html('');
				 
				if (typeof iSelClient != 'undefined') {
					if (iSelClient == 'all') {
						bSelClient = true;
					} else if (iSelClient == 'list') {
						var countClient = $('#client_select option:selected', '#frmSystemPurge').length;
						if (countClient > 0) {
							bSelClient = true;
						} else {
							bSelClient = false;
						}
					}
				} else {
					bSelClient = false;
				}	
				var bSelClientAction = false;	
				if (bSelClient == false) {
					if ($('input[name="conCode"]:checked').length > 0) {
						bSelClientAction = true;
					}

					if ($('input[name="conCatArt"]:checked').length > 0) {
						bSelClientAction = true;
					} 

					if ($('input[name="clientCache"]:checked').length > 0) {
						bSelClientAction = true;
					} 

					if ($('input[name="clientLog"]:checked').length > 0) {
						bSelClientAction = true;
					} 

					if ($('input[name="clientHistory"]:checked').length > 0) {
						bSelClientAction = true;
					} 

				}

				if (bSelClient == false && bSelClientAction == true) {
					sErrMsg += "{ERR_MSG_SELECT_CLIENT}<br />";
					bErr = true;
				}
				
				if (iActionSel == 0) {
					sErrMsg += '{ERR_MSG_NO_ACTION}';
					bErr = true;
				}	

				if (bErr == false)				
					box.confirm('{BOX_TITLE}', '{BOX_MESSAGE}', 'document.frmSystemPurge.submit();')
				else {
					$('#system_clear_error_box td:last').html(sErrMsg);
					if ($('#system_clear_error_box').css('display') == 'none') {
						$('#system_clear_error_box').css('display', 'block');
					} 
				}

				
			}) 
		})
	</script>
</head>
<body style="margin: 10px;">
<b>{TITLE}</b>
<div id="system_clear_info_box">
	{INFO_MSG_BOX}
</div>
<div id="system_clear_error_box">
	{ERR_MSG_BOX}
</div>
<div id="system_clear_error"></div>
<form action="" method="post" name="frmSystemPurge" id="frmSystemPurge">
	<div class="system_clear">
	  <div class="system_clear_header">
		&nbsp;
	  </div>
	  
	  <div class="system_clear_group clearfix">
	    <div class="leftCol">
			{GROUP_CLIENT}
		</div>
		<div class="rightCol clearfix">
			<fieldset style="margin-left: 10px;">
			    <legend>{CLIENT_CHOOSE}</legend>
				<div class="system_clear_form_row clearfix">
					<input id="select_all_clients" class="input" name="selectClient" type="radio" value="all"/>
					<label class="labelrightCol">{CLIENT_SELECT_ALL}</label>
				</div>
				<div class="system_clear_form_row clearfix">
					<input id="available_clients" class="input" name="selectClient" type="radio" value="list"/>
					<label class="labelrightCol">{CLIENT_SELECT}</label>
				</div>
				<div class="system_clear_form_row" id="select_list_clients" style="display:none;">
					{SELECT_CLIENT}
				 </div>
			</fieldset>
			
			<div class="system_clear_form_row clearfix">
				<input class="input" name="conCode" type="checkbox" value="1"/>
				<label class="labelrightCol">{CON_CODE}</label>
			</div>
			
			<div class="system_clear_form_row clearfix">
				<input class="input" name="conCatArt" type="checkbox" value="1"/>
				<label class="labelrightCol">{CON_CAT_ART}</label>
			</div>
			
			<div class="system_clear_form_row clearfix">
				<input class="input" name="clientCache" type="checkbox" value="1"/>
				<label class="labelrightCol">{CLIENT_CACHE}</label>
			</div>
			
			<div class="system_clear_form_row clearfix">
				<input class="input" name="clientLog" type="checkbox" value="1"/>
				<label class="labelrightCol">{CLIENT_LOG}</label>
			</div>
			
			<div class="system_clear_form_row clearfix">
				<input class="input" name="clientHistory" type="checkbox" value="1"/>
				<label class="labelrightCol">{CLIENT_HISTORY}</label>
			</div>
			
			<div class="system_clear_form_row clearfix">
				<input class="input" name="keepHistory" type="checkbox" value="1"/>
				<label class="label_middle">{NUMBER_OF_HISTORY}: </label>
				<input class="input" name="keepHistoryNumber" type="text" value="10" style="width: 25px;" maxlength="5"/>
			</div>
			
		</div>
	  </div>
	    
	  <div class="system_clear_group clearfix">
	    <div class="leftCol">
			{GROUP_CONTENIDO}
		</div>
		<div class="rightCol clearfix">
		
			<div class="system_clear_form_row clearfix">
				<input class="input" name="conInuse" type="checkbox" value="1"/>
				<label class="labelrightCol">{CON_INUSE}</label>
			</div>
			
			<div class="system_clear_form_row clearfix">
				<input class="input" name="conPHPLibActiveSession" type="checkbox" value="1"/>
				<label class="labelrightCol">{CON_ACTIVE_SESSION}</label>
			</div>	
			
			<div class="system_clear_form_row clearfix">
				<input class="input" name="conLog" type="checkbox" value="1"/>
				<label class="labelrightCol">{CON_LOG}</label>
			</div>
			
			<div class="system_clear_form_row clearfix">
				<input class="input" name="conCache" type="checkbox" value="1"/>
				<label class="labelrightCol">{CON_CACHE}</label>
			</div>
			
			<div class="system_clear_form_row clearfix">
				<input class="input" name="conCronjobs" type="checkbox" value="1"/>
				<label class="labelrightCol">{CON_CRONJOB}</label>
			</div>
      
   <div class="system_clear_form_row clearfix">
				<input class="input" name="conSequence" type="checkbox" value="1"/>
				<label class="labelrightCol">{CON_SEQUENCE}</label>
			</div>
		</div>
	  </div>	
	 
	  <div class="system_clear_group clearfix">
			<div class="bottom">
			    <input type="hidden" name="send" value="store"/>
				<img id="imgFormSubmit" src="images/but_ok.gif" alt="{SUBMIT_TEXT}" border="0">
			</div>
    	</div>
	</div>
</form>

</body>
</html>